3.1.94 \(\int \frac {x^{-1+n} (b+2 c x^n)}{-a+b x^n+c x^{2 n}} \, dx\)

Optimal. Leaf size=21 \[ \frac {\log \left (a-b x^n-c x^{2 n}\right )}{n} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {1468, 628} \begin {gather*} \frac {\log \left (a-b x^n-c x^{2 n}\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^(-1 + n)*(b + 2*c*x^n))/(-a + b*x^n + c*x^(2*n)),x]

[Out]

Log[a - b*x^n - c*x^(2*n)]/n

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1468

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :>
 Dist[1/n, Subst[Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p, q}, x]
 && EqQ[n2, 2*n] && EqQ[Simplify[m - n + 1], 0]

Rubi steps

\begin {align*} \int \frac {x^{-1+n} \left (b+2 c x^n\right )}{-a+b x^n+c x^{2 n}} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b+2 c x}{-a+b x+c x^2} \, dx,x,x^n\right )}{n}\\ &=\frac {\log \left (a-b x^n-c x^{2 n}\right )}{n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 21, normalized size = 1.00 \begin {gather*} \frac {\log \left (a-b x^n-c x^{2 n}\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^(-1 + n)*(b + 2*c*x^n))/(-a + b*x^n + c*x^(2*n)),x]

[Out]

Log[a - b*x^n - c*x^(2*n)]/n

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.08, size = 21, normalized size = 1.00 \begin {gather*} \frac {\log \left (a-b x^n-c x^{2 n}\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(x^(-1 + n)*(b + 2*c*x^n))/(-a + b*x^n + c*x^(2*n)),x]

[Out]

Log[a - b*x^n - c*x^(2*n)]/n

________________________________________________________________________________________

fricas [A]  time = 1.22, size = 21, normalized size = 1.00 \begin {gather*} \frac {\log \left (c x^{2 \, n} + b x^{n} - a\right )}{n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(b+2*c*x^n)/(-a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

log(c*x^(2*n) + b*x^n - a)/n

________________________________________________________________________________________

giac [A]  time = 0.37, size = 21, normalized size = 1.00 \begin {gather*} \frac {\log \left (c x^{2 \, n} + b x^{n} - a\right )}{n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(b+2*c*x^n)/(-a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

log(c*x^(2*n) + b*x^n - a)/n

________________________________________________________________________________________

maple [A]  time = 0.02, size = 26, normalized size = 1.24 \begin {gather*} \frac {\ln \left (-b \,{\mathrm e}^{n \ln \relax (x )}-c \,{\mathrm e}^{2 n \ln \relax (x )}+a \right )}{n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n-1)*(b+2*c*x^n)/(-a+b*x^n+c*x^(2*n)),x)

[Out]

1/n*ln(-c*exp(n*ln(x))^2-b*exp(n*ln(x))+a)

________________________________________________________________________________________

maxima [A]  time = 0.60, size = 25, normalized size = 1.19 \begin {gather*} \frac {\log \left (\frac {c x^{2 \, n} + b x^{n} - a}{c}\right )}{n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(b+2*c*x^n)/(-a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

log((c*x^(2*n) + b*x^n - a)/c)/n

________________________________________________________________________________________

mupad [B]  time = 2.68, size = 199, normalized size = 9.48 \begin {gather*} \ln \left (\frac {2\,c\,x^n}{n}-\left (\frac {1}{n}+\frac {b\,\sqrt {b^2+4\,a\,c}}{n\,b^2+4\,a\,c\,n}\right )\,\left (b+2\,c\,x^n\right )\right )\,\left (\frac {1}{n}+\frac {b\,\sqrt {b^2+4\,a\,c}}{n\,b^2+4\,a\,c\,n}\right )+\ln \left (\frac {2\,c\,x^n}{n}-\left (\frac {1}{n}-\frac {b\,\sqrt {b^2+4\,a\,c}}{n\,b^2+4\,a\,c\,n}\right )\,\left (b+2\,c\,x^n\right )\right )\,\left (\frac {1}{n}-\frac {b\,\sqrt {b^2+4\,a\,c}}{n\,b^2+4\,a\,c\,n}\right )-\frac {2\,b\,\mathrm {atanh}\left (\frac {b+2\,c\,x^n}{\sqrt {b^2+4\,a\,c}}\right )}{n\,\sqrt {b^2+4\,a\,c}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^(n - 1)*(b + 2*c*x^n))/(b*x^n - a + c*x^(2*n)),x)

[Out]

log((2*c*x^n)/n - (1/n + (b*(4*a*c + b^2)^(1/2))/(b^2*n + 4*a*c*n))*(b + 2*c*x^n))*(1/n + (b*(4*a*c + b^2)^(1/
2))/(b^2*n + 4*a*c*n)) + log((2*c*x^n)/n - (1/n - (b*(4*a*c + b^2)^(1/2))/(b^2*n + 4*a*c*n))*(b + 2*c*x^n))*(1
/n - (b*(4*a*c + b^2)^(1/2))/(b^2*n + 4*a*c*n)) - (2*b*atanh((b + 2*c*x^n)/(4*a*c + b^2)^(1/2)))/(n*(4*a*c + b
^2)^(1/2))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+n)*(b+2*c*x**n)/(-a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________